package com.cse587.util;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class SpringFactory {
	    private static SpringFactory sfInstance;
        private ApplicationContext ctx = null;
        protected SpringFactory() {
                ctx = new FileSystemXmlApplicationContext("war/WEB-INF/client_application_context.xml");
        }
        
        public static SpringFactory getInstance() {
            if( sfInstance == null ) {
                    sfInstance = new SpringFactory();
            } 
            return sfInstance;
        }
        
        public ApplicationContext getApplicationContext(){
        	return ctx;
        }
}